<template>
	<view class="content">
		<!-- <image class="img1" src="@/static/img/bg_2.png" mode="widthFix"></image>
		<image class="img2" src="@/static/img/bg_1.png" mode="widthFix"></image> -->
		<image class="img2" src="https://ktalk-chat.oss-cn-beijing.aliyuncs.com/default_avatar/bannr.png" mode="widthFix"></image>
		<image v-if="show" class="img3" src="@/static/img/hint.png" mode="widthFix"></image>
		<view class="btns">
			<image src="@/static/img/down_icon.png" mode="widthFix"></image>
			<a :href="downUrl">下载APP</a>
			<!-- <a >下载APP</view> -->
		</view>
	</view>
</template>

<script>
	import {getNewAppInfoAPI} from '@/api/api.js'
	export default {
		data() {
			return {
				downUrl: 'https://z.ppx6.com/avxvfa',
				show: false
			}
		},
		onLoad() {
			// getNewAppInfoAPI().then(res=>{
			// 	console.log(res);
			// 	this.downUrl = res.data.androidUrl
			// })
			// const userAgent = window.navigator.userAgent.toLowerCase();
			// console.log(userAgent);
			// console.log(userAgent.match(/MicroMessenger/));
			// if (userAgent.match(/MicroMessenger/i) == 'micromessenger') {
			// 	this.show = true; // 微信中打开
			// } else {
			// 	this.show = false; // 普通浏览器中打开
			// }
			// if (userAgent.indexof('micromessenger') !== -1) {
			// 	// 在微信中打开，显示遮罩层
			// 	this.show = true;
			// }
		}
	}
</script>


<style scoped lang="scss">
	.content {
		/* background: white; */
		width: 100vw;
		height: 100vh;
		// overflow: hidden;
		// padding-top: 280rpx;
		// background: url('@/static/img/bg_2.png') no-repeat;
		position: relative;
	}

	.img1 {
		width: 100vw;
		position: absolute;
		left: 0;
		bottom: 0;
	}

	.img2 {
		width: 100vw;
		position: absolute;
		left: 0;
		top: 0;
	}

	.img3 {
		width: 244rpx;
		position: fixed;
		right: 30rpx;
		top: 0;
	}

	.btns {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 560rpx;
		height: 100rpx;
		position: fixed;
		bottom: 100rpx;
		margin: 0 95rpx;
		background: #3F93FF;
		border-radius: 60rpx;
		font-weight: 500;
		font-size: 36rpx;
		color: #FFFFFF;

		image {
			width: 48rpx;
			margin-right: 20rpx;
		}

		a {
			color: white;
			text-decoration: none;
		}
	}
</style>